3.87 \(\int \frac{(d+e x)^2 (a+b \log (c x^n))^2}{x} \, dx\)

Optimal. Leaf size=137 \[ \frac{d^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+2 d e x \left (a+b \log \left (c x^n\right )\right )^2+\frac{1}{2} e^2 x^2 \left (a+b \log \left (c x^n\right )\right )^2-\frac{1}{2} b e^2 n x^2 \left (a+b \log \left (c x^n\right )\right )-4 a b d e n x-4 b^2 d e n x \log \left (c x^n\right )+4 b^2 d e n^2 x+\frac{1}{4} b^2 e^2 n^2 x^2 \]

[Out]

-4*a*b*d*e*n*x + 4*b^2*d*e*n^2*x + (b^2*e^2*n^2*x^2)/4 - 4*b^2*d*e*n*x*Log[c*x^n] - (b*e^2*n*x^2*(a + b*Log[c*
x^n]))/2 + 2*d*e*x*(a + b*Log[c*x^n])^2 + (e^2*x^2*(a + b*Log[c*x^n])^2)/2 + (d^2*(a + b*Log[c*x^n])^3)/(3*b*n
)

________________________________________________________________________________________

Rubi [A]  time = 0.231319, antiderivative size = 137, normalized size of antiderivative = 1., number of steps used = 14, number of rules used = 8, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.348, Rules used = {2346, 2302, 30, 2296, 2295, 2330, 2305, 2304} \[ \frac{d^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+2 d e x \left (a+b \log \left (c x^n\right )\right )^2+\frac{1}{2} e^2 x^2 \left (a+b \log \left (c x^n\right )\right )^2-\frac{1}{2} b e^2 n x^2 \left (a+b \log \left (c x^n\right )\right )-4 a b d e n x-4 b^2 d e n x \log \left (c x^n\right )+4 b^2 d e n^2 x+\frac{1}{4} b^2 e^2 n^2 x^2 \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)^2*(a + b*Log[c*x^n])^2)/x,x]

[Out]

-4*a*b*d*e*n*x + 4*b^2*d*e*n^2*x + (b^2*e^2*n^2*x^2)/4 - 4*b^2*d*e*n*x*Log[c*x^n] - (b*e^2*n*x^2*(a + b*Log[c*
x^n]))/2 + 2*d*e*x*(a + b*Log[c*x^n])^2 + (e^2*x^2*(a + b*Log[c*x^n])^2)/2 + (d^2*(a + b*Log[c*x^n])^3)/(3*b*n
)

Rule 2346

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[((d
 + e*x)^(q - 1)*(a + b*Log[c*x^n])^p)/x, x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2330

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = Expand
Integrand[(a + b*Log[c*x^n])^p, (d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n, p, q, r}
, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[r]))

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps

\begin{align*} \int \frac{(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx &=d \int \frac{(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx+e \int (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx\\ &=d^2 \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx+e \int \left (d \left (a+b \log \left (c x^n\right )\right )^2+e x \left (a+b \log \left (c x^n\right )\right )^2\right ) \, dx+(d e) \int \left (a+b \log \left (c x^n\right )\right )^2 \, dx\\ &=d e x \left (a+b \log \left (c x^n\right )\right )^2+(d e) \int \left (a+b \log \left (c x^n\right )\right )^2 \, dx+e^2 \int x \left (a+b \log \left (c x^n\right )\right )^2 \, dx+\frac{d^2 \operatorname{Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{b n}-(2 b d e n) \int \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=-2 a b d e n x+2 d e x \left (a+b \log \left (c x^n\right )\right )^2+\frac{1}{2} e^2 x^2 \left (a+b \log \left (c x^n\right )\right )^2+\frac{d^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-(2 b d e n) \int \left (a+b \log \left (c x^n\right )\right ) \, dx-\left (2 b^2 d e n\right ) \int \log \left (c x^n\right ) \, dx-\left (b e^2 n\right ) \int x \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=-4 a b d e n x+2 b^2 d e n^2 x+\frac{1}{4} b^2 e^2 n^2 x^2-2 b^2 d e n x \log \left (c x^n\right )-\frac{1}{2} b e^2 n x^2 \left (a+b \log \left (c x^n\right )\right )+2 d e x \left (a+b \log \left (c x^n\right )\right )^2+\frac{1}{2} e^2 x^2 \left (a+b \log \left (c x^n\right )\right )^2+\frac{d^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\left (2 b^2 d e n\right ) \int \log \left (c x^n\right ) \, dx\\ &=-4 a b d e n x+4 b^2 d e n^2 x+\frac{1}{4} b^2 e^2 n^2 x^2-4 b^2 d e n x \log \left (c x^n\right )-\frac{1}{2} b e^2 n x^2 \left (a+b \log \left (c x^n\right )\right )+2 d e x \left (a+b \log \left (c x^n\right )\right )^2+\frac{1}{2} e^2 x^2 \left (a+b \log \left (c x^n\right )\right )^2+\frac{d^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}\\ \end{align*}

Mathematica [A]  time = 0.037655, size = 114, normalized size = 0.83 \[ \frac{d^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+2 d e x \left (a+b \log \left (c x^n\right )\right )^2-4 b d e n x \left (a+b \log \left (c x^n\right )-b n\right )+\frac{1}{2} e^2 x^2 \left (a+b \log \left (c x^n\right )\right )^2+\frac{1}{4} b e^2 n x^2 \left (-2 a-2 b \log \left (c x^n\right )+b n\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)^2*(a + b*Log[c*x^n])^2)/x,x]

[Out]

(b*e^2*n*x^2*(-2*a + b*n - 2*b*Log[c*x^n]))/4 + 2*d*e*x*(a + b*Log[c*x^n])^2 + (e^2*x^2*(a + b*Log[c*x^n])^2)/
2 + (d^2*(a + b*Log[c*x^n])^3)/(3*b*n) - 4*b*d*e*n*x*(a - b*n + b*Log[c*x^n])

________________________________________________________________________________________

Maple [C]  time = 0.369, size = 2543, normalized size = 18.6 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(a+b*ln(c*x^n))^2/x,x)

[Out]

1/2*a^2*e^2*x^2-1/4*ln(x)*Pi^2*b^2*d^2*csgn(I*x^n)^2*csgn(I*c*x^n)^4+1/2*ln(x)*Pi^2*b^2*d^2*csgn(I*x^n)*csgn(I
*c*x^n)^5+1/2*ln(x)*Pi^2*b^2*d^2*csgn(I*c*x^n)^5*csgn(I*c)-1/4*ln(x)*Pi^2*b^2*d^2*csgn(I*c*x^n)^4*csgn(I*c)^2+
ln(x)*a^2*d^2+(1/2*b^2*e^2*x^2+2*b^2*d*e*x+b^2*d^2*ln(x))*ln(x^n)^2+(-b^2*d^2*n*ln(x)^2-2*I*Pi*b^2*d*e*x*csgn(
I*c*x^n)^3+I*Pi*ln(x)*b^2*d^2*csgn(I*x^n)*csgn(I*c*x^n)^2+2*I*Pi*b^2*d*e*x*csgn(I*c*x^n)^2*csgn(I*c)+I*Pi*ln(x
)*b^2*d^2*csgn(I*c*x^n)^2*csgn(I*c)-I*Pi*ln(x)*b^2*d^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-1/2*I*Pi*b^2*e^2*x^
2*csgn(I*c*x^n)^3+1/2*I*Pi*b^2*e^2*x^2*csgn(I*x^n)*csgn(I*c*x^n)^2+1/2*I*Pi*b^2*e^2*x^2*csgn(I*c*x^n)^2*csgn(I
*c)+ln(c)*b^2*e^2*x^2-1/2*b^2*e^2*n*x^2+4*ln(c)*b^2*d*e*x+a*b*e^2*x^2-4*b^2*d*e*n*x+4*a*b*d*e*x-2*I*Pi*b^2*d*e
*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-I*Pi*ln(x)*b^2*d^2*csgn(I*c*x^n)^3-1/2*I*Pi*b^2*e^2*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^2*csgn(I*x^n)^2*csgn(I*c*x^n)^3*csgn(I*c)-1/8*Pi^2*b^2*e^2*x^2*csgn(I*x^n)^2*csgn(I*c*x^n)^2*csgn(I*c)^
2-2*I*Pi*a*b*d*e*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-I*ln(x)*ln(c)*Pi*b^2*d^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn
(I*c)-1/2*n*ln(c)*b^2*e^2*x^2+2*ln(x)*ln(c)*a*b*d^2+2*ln(c)^2*b^2*d*e*x+ln(c)*a*b*e^2*x^2

________________________________________________________________________________________

Maxima [A]  time = 1.20348, size = 267, normalized size = 1.95 \begin{align*} \frac{1}{2} \, b^{2} e^{2} x^{2} \log \left (c x^{n}\right )^{2} - \frac{1}{2} \, a b e^{2} n x^{2} + a b e^{2} x^{2} \log \left (c x^{n}\right ) + 2 \, b^{2} d e x \log \left (c x^{n}\right )^{2} - 4 \, a b d e n x + \frac{1}{2} \, a^{2} e^{2} x^{2} + 4 \, a b d e x \log \left (c x^{n}\right ) + \frac{b^{2} d^{2} \log \left (c x^{n}\right )^{3}}{3 \, n} + 4 \,{\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} b^{2} d e + \frac{1}{4} \,{\left (n^{2} x^{2} - 2 \, n x^{2} \log \left (c x^{n}\right )\right )} b^{2} e^{2} + 2 \, a^{2} d e x + \frac{a b d^{2} \log \left (c x^{n}\right )^{2}}{n} + a^{2} d^{2} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x,x, algorithm="maxima")

[Out]

1/2*b^2*e^2*x^2*log(c*x^n)^2 - 1/2*a*b*e^2*n*x^2 + a*b*e^2*x^2*log(c*x^n) + 2*b^2*d*e*x*log(c*x^n)^2 - 4*a*b*d
*e*n*x + 1/2*a^2*e^2*x^2 + 4*a*b*d*e*x*log(c*x^n) + 1/3*b^2*d^2*log(c*x^n)^3/n + 4*(n^2*x - n*x*log(c*x^n))*b^
2*d*e + 1/4*(n^2*x^2 - 2*n*x^2*log(c*x^n))*b^2*e^2 + 2*a^2*d*e*x + a*b*d^2*log(c*x^n)^2/n + a^2*d^2*log(x)

________________________________________________________________________________________

Fricas [B]  time = 1.07127, size = 660, normalized size = 4.82 \begin{align*} \frac{1}{3} \, b^{2} d^{2} n^{2} \log \left (x\right )^{3} + \frac{1}{4} \,{\left (b^{2} e^{2} n^{2} - 2 \, a b e^{2} n + 2 \, a^{2} e^{2}\right )} x^{2} + \frac{1}{2} \,{\left (b^{2} e^{2} x^{2} + 4 \, b^{2} d e x\right )} \log \left (c\right )^{2} + \frac{1}{2} \,{\left (b^{2} e^{2} n^{2} x^{2} + 4 \, b^{2} d e n^{2} x + 2 \, b^{2} d^{2} n \log \left (c\right ) + 2 \, a b d^{2} n\right )} \log \left (x\right )^{2} + 2 \,{\left (2 \, b^{2} d e n^{2} - 2 \, a b d e n + a^{2} d e\right )} x - \frac{1}{2} \,{\left ({\left (b^{2} e^{2} n - 2 \, a b e^{2}\right )} x^{2} + 8 \,{\left (b^{2} d e n - a b d e\right )} x\right )} \log \left (c\right ) + \frac{1}{2} \,{\left (2 \, b^{2} d^{2} \log \left (c\right )^{2} + 2 \, a^{2} d^{2} -{\left (b^{2} e^{2} n^{2} - 2 \, a b e^{2} n\right )} x^{2} - 8 \,{\left (b^{2} d e n^{2} - a b d e n\right )} x + 2 \,{\left (b^{2} e^{2} n x^{2} + 4 \, b^{2} d e n x + 2 \, a b d^{2}\right )} \log \left (c\right )\right )} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x,x, algorithm="fricas")

[Out]

1/3*b^2*d^2*n^2*log(x)^3 + 1/4*(b^2*e^2*n^2 - 2*a*b*e^2*n + 2*a^2*e^2)*x^2 + 1/2*(b^2*e^2*x^2 + 4*b^2*d*e*x)*l
og(c)^2 + 1/2*(b^2*e^2*n^2*x^2 + 4*b^2*d*e*n^2*x + 2*b^2*d^2*n*log(c) + 2*a*b*d^2*n)*log(x)^2 + 2*(2*b^2*d*e*n
^2 - 2*a*b*d*e*n + a^2*d*e)*x - 1/2*((b^2*e^2*n - 2*a*b*e^2)*x^2 + 8*(b^2*d*e*n - a*b*d*e)*x)*log(c) + 1/2*(2*
b^2*d^2*log(c)^2 + 2*a^2*d^2 - (b^2*e^2*n^2 - 2*a*b*e^2*n)*x^2 - 8*(b^2*d*e*n^2 - a*b*d*e*n)*x + 2*(b^2*e^2*n*
x^2 + 4*b^2*d*e*n*x + 2*a*b*d^2)*log(c))*log(x)

________________________________________________________________________________________

Sympy [B]  time = 2.83262, size = 398, normalized size = 2.91 \begin{align*} a^{2} d^{2} \log{\left (x \right )} + 2 a^{2} d e x + \frac{a^{2} e^{2} x^{2}}{2} + a b d^{2} n \log{\left (x \right )}^{2} + 2 a b d^{2} \log{\left (c \right )} \log{\left (x \right )} + 4 a b d e n x \log{\left (x \right )} - 4 a b d e n x + 4 a b d e x \log{\left (c \right )} + a b e^{2} n x^{2} \log{\left (x \right )} - \frac{a b e^{2} n x^{2}}{2} + a b e^{2} x^{2} \log{\left (c \right )} + \frac{b^{2} d^{2} n^{2} \log{\left (x \right )}^{3}}{3} + b^{2} d^{2} n \log{\left (c \right )} \log{\left (x \right )}^{2} + b^{2} d^{2} \log{\left (c \right )}^{2} \log{\left (x \right )} + 2 b^{2} d e n^{2} x \log{\left (x \right )}^{2} - 4 b^{2} d e n^{2} x \log{\left (x \right )} + 4 b^{2} d e n^{2} x + 4 b^{2} d e n x \log{\left (c \right )} \log{\left (x \right )} - 4 b^{2} d e n x \log{\left (c \right )} + 2 b^{2} d e x \log{\left (c \right )}^{2} + \frac{b^{2} e^{2} n^{2} x^{2} \log{\left (x \right )}^{2}}{2} - \frac{b^{2} e^{2} n^{2} x^{2} \log{\left (x \right )}}{2} + \frac{b^{2} e^{2} n^{2} x^{2}}{4} + b^{2} e^{2} n x^{2} \log{\left (c \right )} \log{\left (x \right )} - \frac{b^{2} e^{2} n x^{2} \log{\left (c \right )}}{2} + \frac{b^{2} e^{2} x^{2} \log{\left (c \right )}^{2}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(a+b*ln(c*x**n))**2/x,x)

[Out]

a**2*d**2*log(x) + 2*a**2*d*e*x + a**2*e**2*x**2/2 + a*b*d**2*n*log(x)**2 + 2*a*b*d**2*log(c)*log(x) + 4*a*b*d
*e*n*x*log(x) - 4*a*b*d*e*n*x + 4*a*b*d*e*x*log(c) + a*b*e**2*n*x**2*log(x) - a*b*e**2*n*x**2/2 + a*b*e**2*x**
2*log(c) + b**2*d**2*n**2*log(x)**3/3 + b**2*d**2*n*log(c)*log(x)**2 + b**2*d**2*log(c)**2*log(x) + 2*b**2*d*e
*n**2*x*log(x)**2 - 4*b**2*d*e*n**2*x*log(x) + 4*b**2*d*e*n**2*x + 4*b**2*d*e*n*x*log(c)*log(x) - 4*b**2*d*e*n
*x*log(c) + 2*b**2*d*e*x*log(c)**2 + b**2*e**2*n**2*x**2*log(x)**2/2 - b**2*e**2*n**2*x**2*log(x)/2 + b**2*e**
2*n**2*x**2/4 + b**2*e**2*n*x**2*log(c)*log(x) - b**2*e**2*n*x**2*log(c)/2 + b**2*e**2*x**2*log(c)**2/2

________________________________________________________________________________________

Giac [B]  time = 1.30188, size = 433, normalized size = 3.16 \begin{align*} \frac{1}{2} \, b^{2} n^{2} x^{2} e^{2} \log \left (x\right )^{2} + 2 \, b^{2} d n^{2} x e \log \left (x\right )^{2} + \frac{1}{3} \, b^{2} d^{2} n^{2} \log \left (x\right )^{3} - \frac{1}{2} \, b^{2} n^{2} x^{2} e^{2} \log \left (x\right ) - 4 \, b^{2} d n^{2} x e \log \left (x\right ) + b^{2} n x^{2} e^{2} \log \left (c\right ) \log \left (x\right ) + 4 \, b^{2} d n x e \log \left (c\right ) \log \left (x\right ) + b^{2} d^{2} n \log \left (c\right ) \log \left (x\right )^{2} + \frac{1}{4} \, b^{2} n^{2} x^{2} e^{2} + 4 \, b^{2} d n^{2} x e - \frac{1}{2} \, b^{2} n x^{2} e^{2} \log \left (c\right ) - 4 \, b^{2} d n x e \log \left (c\right ) + \frac{1}{2} \, b^{2} x^{2} e^{2} \log \left (c\right )^{2} + 2 \, b^{2} d x e \log \left (c\right )^{2} + a b n x^{2} e^{2} \log \left (x\right ) + 4 \, a b d n x e \log \left (x\right ) + b^{2} d^{2} \log \left (c\right )^{2} \log \left (x\right ) + a b d^{2} n \log \left (x\right )^{2} - \frac{1}{2} \, a b n x^{2} e^{2} - 4 \, a b d n x e + a b x^{2} e^{2} \log \left (c\right ) + 4 \, a b d x e \log \left (c\right ) + 2 \, a b d^{2} \log \left (c\right ) \log \left (x\right ) + \frac{1}{2} \, a^{2} x^{2} e^{2} + 2 \, a^{2} d x e + a^{2} d^{2} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x,x, algorithm="giac")

[Out]

1/2*b^2*n^2*x^2*e^2*log(x)^2 + 2*b^2*d*n^2*x*e*log(x)^2 + 1/3*b^2*d^2*n^2*log(x)^3 - 1/2*b^2*n^2*x^2*e^2*log(x
) - 4*b^2*d*n^2*x*e*log(x) + b^2*n*x^2*e^2*log(c)*log(x) + 4*b^2*d*n*x*e*log(c)*log(x) + b^2*d^2*n*log(c)*log(
x)^2 + 1/4*b^2*n^2*x^2*e^2 + 4*b^2*d*n^2*x*e - 1/2*b^2*n*x^2*e^2*log(c) - 4*b^2*d*n*x*e*log(c) + 1/2*b^2*x^2*e
^2*log(c)^2 + 2*b^2*d*x*e*log(c)^2 + a*b*n*x^2*e^2*log(x) + 4*a*b*d*n*x*e*log(x) + b^2*d^2*log(c)^2*log(x) + a
*b*d^2*n*log(x)^2 - 1/2*a*b*n*x^2*e^2 - 4*a*b*d*n*x*e + a*b*x^2*e^2*log(c) + 4*a*b*d*x*e*log(c) + 2*a*b*d^2*lo
g(c)*log(x) + 1/2*a^2*x^2*e^2 + 2*a^2*d*x*e + a^2*d^2*log(x)